<?php
// +----------------------------------------------------------------------
// | 07FLYSAAS [基于ThinkPHP5.0开发]
// +----------------------------------------------------------------------
// | Copyright (c) 2025-2035 http://www.07fly.xyz
// +----------------------------------------------------------------------
// | Professional because of focus  Persevering because of happiness
// +----------------------------------------------------------------------
// | Author: 开发人生 <goodkfrs@qq.com>
// +----------------------------------------------------------------------
/**
 * 表结构基本信息
 */
/**table_name 数据库表名（不带前缀）
 * type 类型
 * length 类型长度
 * unsigned 是否无符号
 * autoincrement 是否自动增长
 * required  是否必填
 * default  默认值
 * comment  注释
 */
return [
    'tables' => [
        'cst_customer' => [
            'table_name' => 'cst_customer',
            'comment' => '[tmsc]客户信息表',
            'engine' => 'InnoDB',
            'charset' => 'utf8mb4',
            'collate' => 'utf8mb4_general_ci',
            'columns' => [
                'id' => ['type' => 'int', 'length' => 16, 'unsigned' => false, 'autoincrement' => true, 'comment' => '主id',],
                'name' => ['type' => 'varchar', 'length' => 64, 'required' => true, 'default' => '', 'comment' => '客户名称'],
                'customer_no' => ['type' => 'varchar', 'length' => 64, 'required' => true, 'default' => '', 'comment' => '客户编号'],
                'next_time' => ['type' => 'datetime', 'required' => true, 'comment' => '下次沟通时间'],
                'link_time' => ['type' => 'datetime', 'required' => true, 'comment' => '最近联系时间'],
                'link_body' => ['type' => 'varchar', 'length' => 1024, 'required' => true, 'default' => '', 'comment' => '最近沟通内容'],
                'linkman' => ['type' => 'varchar', 'length' => 250, 'required' => false, 'default' => '', 'comment' => '客户代表'],
                'source' => ['type' => 'varchar', 'length' => 250, 'required' => false, 'default' => '', 'comment' => '客户来源'],
                'mobile' => ['type' => 'varchar', 'length' => 250, 'required' => false, 'default' => '', 'comment' => '客户手机号'],
                'mobile2' => ['type' => 'varchar', 'length' => 250, 'required' => false, 'default' => '', 'comment' => '紧急联系人电话'],
                'gender' => ['type' => 'varchar', 'length' => 250, 'required' => false, 'default' => '', 'comment' => '客户性别'],
                'cst_type' => ['type' => 'varchar', 'length' => 250, 'required' => false, 'default' => '', 'comment' => '客户类型'],
                'birthday' => ['type' => 'date', 'required' => false, 'comment' => '生日'],
                'idcard' => ['type' => 'varchar', 'length' => 250, 'required' => false, 'default' => '', 'comment' => '客户身份证号'],
                'passport' => ['type' => 'varchar', 'length' => 250, 'required' => false, 'default' => '', 'comment' => '护照号'],
                'member_card_no' => ['type' => 'varchar', 'length' => 250, 'required' => false, 'default' => '', 'comment' => '会员卡号'],
                'age_group' => ['type' => 'varchar', 'length' => 250, 'required' => false, 'default' => '', 'comment' => '年龄段划分'],

                'address' => ['type' => 'varchar', 'length' => 250, 'required' => false, 'default' => '', 'comment' => '联系地址'],
                'remark' => ['type' => 'varchar', 'length' => 250, 'required' => false, 'default' => '', 'comment' => '客户备注'],

                'referee' => ['type' => 'varchar', 'length' => 250, 'required' => false, 'default' => '', 'comment' => '推荐人'],

                'total_money' => ['type' => 'int', 'length' => 8, 'required' => false, 'default' => 0, 'comment' => '累计消费'],
                'total_money_cost' => ['type' => 'int', 'length' => 8, 'required' => false, 'default' => 0, 'comment' => '累计成本'],
                'total_integral' => ['type' => 'int', 'length' => 8, 'required' => false, 'default' => 0, 'comment' => '累计积分'],
                'total_cash' => ['type' => 'int', 'length' => 8, 'required' => false, 'default' => 0, 'comment' => '现金卷余额'],

                'create_user_id' => ['type' => 'int', 'length' => 16, 'required' => true, 'default' => '0', 'comment' => '创建人员'],
                'owner_user_id' => ['type' => 'int', 'length' => 16, 'required' => true, 'default' => '0', 'comment' => '归属人员'],
                'create_time' => ['type' => 'int', 'length' => 16, 'required' => false, 'default' => 0, 'comment' => '创建日期',],
                'update_time' => ['type' => 'int', 'length' => 16, 'required' => false, 'default' => 0, 'comment' => '更新日期',],
                'org_id' => ['type' => 'int', 'length' => 16, 'required' => false, 'default' => 1, 'comment' => '企业编号',],
                'ten_tenant_id' => ['type' => 'int', 'length' => 16, 'required' => false, 'default' => 0, 'comment' => '租户id',],
            ],
            'primary' => ['customer_id'],
            'index' => [],
        ],
        'cst_customer_cash' => [
            'table_name' => 'cst_customer_cash',
            'comment' => '[客户]客户现金卷表',
            'engine' => 'InnoDB',
            'charset' => 'utf8mb4',
            'collate' => 'utf8mb4_general_ci',
            'columns' => [
                'id' => ['type' => 'int', 'length' => 16, 'unsigned' => false, 'autoincrement' => true, 'comment' => '主id',],
                'customer_id' => ['type' => 'int', 'length' => 16, 'required' => true, 'default' => '0', 'comment' => '客户编号'],
                'valid_date' => ['type' => 'date', 'required' => true, 'comment' => '到期时间'],
                'cash_money' => ['type' => 'int', 'length' => 11, 'required' => true, 'default' => '0', 'comment' => '现金卷金额'],
                'total_cash' => ['type' => 'int', 'length' => 11, 'required' => true, 'default' => '0', 'comment' => '当前账户现金'],
                'status' => ['type' => 'tinyint', 'length' => 4, 'required' => true, 'default' => '0', 'comment' => '-1=未使用，1=使用'],
                'remark' => ['type' => 'varchar', 'length' => 256, 'required' => true, 'default' => '', 'comment' => '备注说明'],

                'create_user_id' => ['type' => 'int', 'length' => 16, 'required' => true, 'default' => '0', 'comment' => '创建人员'],
                'create_time' => ['type' => 'int', 'length' => 16, 'required' => false, 'default' => 0, 'comment' => '创建日期',],
                'update_time' => ['type' => 'int', 'length' => 16, 'required' => false, 'default' => 0, 'comment' => '更新日期',],
                'org_id' => ['type' => 'int', 'length' => 16, 'required' => false, 'default' => 1, 'comment' => '企业编号',],
                'ten_tenant_id' => ['type' => 'int', 'length' => 16, 'required' => false, 'default' => 0, 'comment' => '租户id',],
            ],
            'primary' => ['cash_id'],
            'index' => [],
        ],
        'cst_customer_integral' => [
            'table_name' => 'cst_customer_integral',
            'comment' => '[客户]客户积分表',
            'engine' => 'InnoDB',
            'charset' => 'utf8mb4',
            'collate' => 'utf8mb4_general_ci',
            'columns' => [
                'id' => ['type' => 'int', 'length' => 16, 'unsigned' => false, 'autoincrement' => true, 'comment' => '主id',],
                'customer_id' => ['type' => 'int', 'length' => 16, 'required' => true, 'default' => '0', ' comment' => '客户编号'],
                'valid_date' => ['type' => 'date', 'required' => true, 'comment' => '发现时间'],
                'integral' => ['type' => 'int', 'length' => 11, 'required' => true, 'comment' => '积分'],
                'total_integral' => ['type' => 'int', 'length' => 11, 'required' => true, 'comment' => '总积分'],
                'remark' => ['type' => 'varchar', 'length' => 256, 'required' => true, 'comment' => '备注说明'],

                'create_user_id' => ['type' => 'int', 'length' => 16, 'required' => true, 'default' => '0', 'comment' => '创建人员'],
                'create_time' => ['type' => 'int', 'length' => 16, 'required' => false, 'default' => 0, 'comment' => '创建日期',],
                'update_time' => ['type' => 'int', 'length' => 16, 'required' => false, 'default' => 0, 'comment' => '更新日期',],
                'org_id' => ['type' => 'int', 'length' => 16, 'required' => false, 'default' => 1, 'comment' => '企业编号',],
                'ten_tenant_id' => ['type' => 'int', 'length' => 16, 'required' => false, 'default' => 0, 'comment' => '租户id',],
            ],
            'primary' => ['integral_id'],
            'index' => [],
        ],
        'pro_product' => [
            'table_name' => 'pro_product',
            'comment' => '[产品]产品信息表',
            'engine' => 'InnoDB',
            'charset' => 'utf8mb4',
            'collate' => 'utf8mb4_general_ci',
            'columns' => [
                'id' => ['type' => 'int', 'length' => 16, 'unsigned' => false, 'autoincrement' => true, 'comment' => '主id',],
                'name' => ['type' => 'varchar', 'length' => 256, 'required' => true, 'comment' => '产品名称'],
                'product_no' => ['type' => 'varchar', 'length' => 256, 'required' => true, 'comment' => '产品编号'],
                'category_id' => ['type' => 'int', 'length' => 11, 'required' => true, 'default' => 0, 'comment' => '分类编号'],

                'price_adult_market' => ['type' => 'decimal', 'length' => '10,2', 'required' => true, 'default' => '0.00', 'comment' => '成人直客价格'],
                'price_adult_lowest' => ['type' => 'decimal', 'length' => '10,2', 'required' => true, 'default' => '0.00', 'comment' => '成人最低价格'],
                'price_adult_cost' => ['type' => 'decimal', 'length' => '10,2', 'required' => true, 'default' => '0.00', 'comment' => '成人结算价格'],
                'price_child_market' => ['type' => 'decimal', 'length' => '10,2', 'required' => true, 'default' => '0.00', 'comment' => '儿童直客价格'],
                'price_child_lowest' => ['type' => 'decimal', 'length' => '10,2', 'required' => true, 'default' => '0.00', 'comment' => '儿童最低价格'],
                'price_child_cost' => ['type' => 'decimal', 'length' => '10,2', 'required' => true, 'default' => '0.00', 'comment' => '儿童结算价格'],
                'price_eldely_market' => ['type' => 'decimal', 'length' => '10,2', 'required' => true, 'default' => '0.00', 'comment' => '老人价格'],
                'price_eldely_cost' => ['type' => 'decimal', 'length' => '10,2', 'required' => true, 'default' => '0.00', 'comment' => '老人成本'],
                'city_set_out' => ['type' => 'varchar', 'length' => 256, 'required' => true, 'comment' => '出发地'],
                'city_get_to' => ['type' => 'varchar', 'length' => 256, 'required' => true, 'comment' => '目的地'],
                'city_set_out_time' => ['type' => 'varchar', 'length' => 256, 'required' => true, 'comment' => '出发时间'],
                'price_single' => ['type' => 'int', 'length' => 11, 'required' => true, 'default' => 0, 'comment' => '单房差'],
                'trip_days' => ['type' => 'int', 'length' => 11, 'required' => true, 'default' => 0, 'comment' => '天数'],
                'trip_nights' => ['type' => 'int', 'length' => 11, 'required' => true, 'default' => 0, 'comment' => '晚数'],

                'supplier_id' => ['type' => 'int', 'length' => 16, 'required' => true, 'default' => 0, 'comment' => '供应商ID'],
                'supplier_name' => ['type' => 'varchar', 'length' => 50, 'required' => true, 'comment' => '供应商名称'],
                'supplier_mobile' => ['type' => 'varchar', 'length' => 50, 'required' => true, 'comment' => '供应商手机'],
                'supplier_linkman' => ['type' => 'varchar', 'length' => 50, 'required' => true, 'comment' => '供应商联系人'],

                'defaultpic' => ['type' => 'varchar', 'length' => 256, 'required' => true, 'comment' => '默认图片'],
                'province' => ['type' => 'varchar', 'length' => 256, 'required' => true, 'comment' => '所在省份'],

                'content' => ['type' => 'text', 'length' => 65535, 'required' => false, 'comment' => '产品内容'],
                'introduction' => ['type' => 'text', 'length' => 65535, 'required' => false, 'comment' => '产品简介'],
                'hotel_traffic' => ['type' => 'text', 'length' => 65535, 'required' => false, 'comment' => '住宿交通'],
                'map' => ['type' => 'text', 'length' => 65535, 'required' => false, 'comment' => '地图'],
                'videos' => ['type' => 'text', 'length' => 65535, 'required' => false, 'comment' => '风景视频'],

                'sort' => ['type' => 'int', 'length' => 11, 'required' => true, 'default' => 0, 'comment' => '排序'],
                'visible' => ['type' => 'tinyint', 'length' => 2, 'required' => true, 'default' => 0, 'comment' => '是否启用'],
                'istop' => ['type' => 'tinyint', 'length' => 2, 'required' => true, 'default' => 0, 'comment' => '是否本周主打'],

                'create_user_id' => ['type' => 'int', 'length' => 16, 'required' => true, 'default' => '0', 'comment' => '创建人员'],
                'create_time' => ['type' => 'int', 'length' => 16, 'required' => false, 'default' => 0, 'comment' => '创建日期',],
                'update_time' => ['type' => 'int', 'length' => 16, 'required' => false, 'default' => 0, 'comment' => '更新日期',],
                'org_id' => ['type' => 'int', 'length' => 16, 'required' => false, 'default' => 1, 'comment' => '企业编号',],
                'ten_tenant_id' => ['type' => 'int', 'length' => 16, 'required' => false, 'default' => 0, 'comment' => '租户id',],
            ],
            'primary' => ['product_id'],
            'index' => [],
        ],
        'sal_order' => [
            'table_name' => 'sal_order',
            'comment' => '[销售]订单表',
            'engine' => 'InnoDB',
            'charset' => 'utf8mb4',
            'collate' => 'utf8mb4_general_ci',
            'columns' => [
                'id' => ['type' => 'int', 'length' => 16, 'unsigned' => false, 'autoincrement' => true, 'comment' => '主id',],
                'order_no' => ['type' => 'varchar', 'length' => 50, 'required' => true, 'default' => '', 'comment' => '合同编号'],
                'product_id' => ['type' => 'int', 'length' => 16, 'required' => true, 'default' => 0, 'comment' => '关联产品'],
                'product_name' => ['type' => 'varchar', 'length' => 256, 'required' => true, 'default' => '', 'comment' => '关联产品名称'],
                'contract_no' => ['type' => 'varchar', 'length' => 256, 'required' => true, 'default' => '', 'comment' => '电子合同编号'],
                'customer_id' => ['type' => 'int', 'length' => 16, 'required' => true, 'default' => 0, 'comment' => '客户代表'],
                'customer_name' => ['type' => 'varchar', 'length' => 50, 'required' => true, 'default' => '', 'comment' => '客户代表名称'],

                'city_get_to' => ['type' => 'varchar', 'length' => 256, 'required' => true, 'default' => '', 'comment' => '目的地'],
                'trip_days' => ['type' => 'int', 'length' => 2, 'required' => true, 'default' => 0, 'comment' => '天数'],
                'trip_nights' => ['type' => 'int', 'length' => 2, 'required' => true, 'default' => 0, 'comment' => '晚数'],
                'start_date' => ['type' => 'date', 'required' => false, 'comment' => '出发时间'],
                'end_date' => ['type' => 'date', 'required' => false, 'comment' => '结束时间'],
                'sign_date' => ['type' => 'date', 'required' => false, 'comment' => '签署时间'],
                'confirm_status' => ['type' => 'smallint', 'length' => 1, 'required' => true, 'default' => 0, 'comment' => '确认件状态 0=未确认，1=确认'],
                'safe_status' => ['type' => 'smallint', 'length' => 1, 'required' => true, 'default' => 0, 'comment' => '保险状态 0=未确认，1=确认'],
                'notice_status' => ['type' => 'smallint', 'length' => 1, 'required' => true, 'default' => 0, 'comment' => '出团通知书 0=未确认，1=确认'],

                'adult_nums' => ['type' => 'int', 'length' => 16, 'required' => true, 'default' => 0, 'comment' => '成人数'],
                'adult_money' => ['type' => 'decimal', 'length' => '10,2', 'required' => true, 'default' => '0.00', 'comment' => '成人金额'],
                'adult_money_cost' => ['type' => 'decimal', 'length' => '10,2', 'required' => true, 'default' => '0.00', 'comment' => '成人结算金额'],
                'child_num' => ['type' => 'int', 'length' => 16, 'required' => true, 'default' => 0, 'comment' => '儿童数'],
                'child_money' => ['type' => 'decimal', 'length' => '10,2', 'required' => true, 'default' => '0.00', 'comment' => '儿童金额'],
                'child_money_cost' => ['type' => 'decimal', 'length' => '10,2', 'required' => true, 'default' => '0.00', 'comment' => '儿童结算金额'],
                'eldely_num' => ['type' => 'int', 'length' => 16, 'required' => true, 'default' => 0, 'comment' => '老人数'],
                'eldely_money' => ['type' => 'decimal', 'length' => '10,0', 'required' => true, 'default' => '0', 'comment' => '老人金额'],
                'eldely_money_cost' => ['type' => 'decimal', 'length' => '10,0', 'required' => true, 'default' => '0', 'comment' => '老人结算金额'],
                'total_nums' => ['type' => 'int', 'length' => 16, 'required' => true, 'default' => 0, 'comment' => '总人数'],
                'room_num' => ['type' => 'int', 'length' => 16, 'required' => true, 'default' => 0, 'comment' => '房间数'],
                'room_single_price' => ['type' => 'decimal', 'length' => '10,0', 'required' => true, 'default' => '0', 'comment' => '单房差价'],
                'is_share_room' => ['type' => 'int', 'length' => 16, 'required' => true, 'default' => 1, 'comment' => '1=同意拼房，-1=不同意拼房'],
                'is_transport' => ['type' => 'int', 'length' => 16, 'required' => true, 'default' => 1, 'comment' => '1=接送，-1=不接送'],

                'remark' => ['type' => 'text', 'length' => 65535, 'required' => false, 'comment' => '备注说明'],

                'money' => ['type' => 'decimal', 'length' => '10,2', 'required' => true, 'default' => '0.00', 'comment' => '订单金额=成人金额+儿童金额+老人金额'],
                'other_money' => ['type' => 'decimal', 'length' => '8,2', 'required' => false, 'default' => '0.00', 'comment' => '其他成本金额'],
                'money_cost' => ['type' => 'decimal', 'length' => '10,2', 'required' => true, 'default' => '0.00', 'comment' => '结算金额'],
                'back_money' => ['type' => 'decimal', 'length' => '10,2', 'required' => true, 'default' => '0.00', 'comment' => '回款金额'],
                'pay_money' => ['type' => 'decimal', 'length' => '10,2', 'unsigned' => true, 'required' => true, 'default' => '0.00', 'comment' => '支付金额'],
                'invoice_money' => ['type' => 'decimal', 'length' => '10,2', 'required' => true, 'default' => '0.00', 'comment' => '开票金额'],
                'profit_money' => ['type' => 'decimal', 'length' => '10,2', 'required' => true, 'default' => '0.00', 'comment' => '利润=订单金额-结算金额-其他成本金额'],

                'status' => ['type' => 'smallint', 'length' => 1, 'required' => true, 'default' => 0, 'comment' => '0=临时单，1=已经确认，2=成团，3=完成'],
                'back_status' => ['type' => 'smallint', 'length' => 1, 'required' => true, 'default' => 0, 'comment' => '回款状态，0=未付，1=部分，2=全部'],
                'pay_status' => ['type' => 'smallint', 'length' => 1, 'required' => true, 'default' => 0, 'comment' => '支付款状态，0=未付，1=部分，2=全部'],
                'invoice_status' => ['type' => 'smallint', 'length' => 1, 'required' => true, 'default' => 0, 'comment' => '开票状态 0=未开，1=部分，2=全部'],

                'dijie_price' => ['type' => 'decimal', 'length' => '8,2', 'required' => false, 'default' => '0.00', 'comment' => '单地接价格'],
                'other_remark' => ['type' => 'varchar', 'length' => 1024, 'required' => false, 'default' => '', 'comment' => '其他备注'],

                'supplier_id' => ['type' => 'int', 'length' => 16, 'required' => true, 'default' => 0, 'comment' => '供应商ID'],
                'supplier_name' => ['type' => 'varchar', 'length' => 50, 'required' => true, 'default' => '', 'comment' => '供应商名称'],
                'supplier_mobile' => ['type' => 'varchar', 'length' => 50, 'required' => true, 'default' => '', 'comment' => '供应商手机'],
                'supplier_linkman' => ['type' => 'varchar', 'length' => 50, 'required' => true, 'default' => '', 'comment' => '供应商联系人'],

                'owner_user_id' => ['type' => 'int', 'length' => 16, 'required' => true, 'default' => 0, 'comment' => '我方联系人'],
                'create_user_id' => ['type' => 'int', 'length' => 16, 'required' => true, 'default' => '0', 'comment' => '创建人员'],
                'create_time' => ['type' => 'int', 'length' => 16, 'required' => false, 'default' => 0, 'comment' => '创建日期',],
                'update_time' => ['type' => 'int', 'length' => 16, 'required' => false, 'default' => 0, 'comment' => '更新日期',],
                'org_id' => ['type' => 'int', 'length' => 16, 'required' => false, 'default' => 1, 'comment' => '企业编号',],
                'ten_tenant_id' => ['type' => 'int', 'length' => 16, 'required' => false, 'default' => 0, 'comment' => '租户id',],
            ],
            'primary' => ['id'],
            'index' => [],
        ],
        'order_tourist' => [
            'table_name' => 'order_tourist',
            'comment' => '[销售]订单明细表',
            'engine' => 'InnoDB',
            'charset' => 'utf8mb4',
            'collate' => 'utf8mb4_general_ci',
            'columns' => [
                'id' => ['type' => 'int', 'length' => 16, 'unsigned' => false, 'autoincrement' => true, 'comment' => '主id',],
                'order_id' => ['type' => 'int', 'length' => 11, 'required' => true, 'default' => 0, 'comment' => '订单ID'],
                'product_id' => ['type' => 'int', 'length' => 11, 'required' => true, 'default' => 0, 'comment' => '产品ID'],
                'product_name' => ['type' => 'varchar', 'length' => 100, 'required' => true, 'comment' => '商品名称'],
                'customer_id' => ['type' => 'int', 'length' => 11, 'required' => true, 'default' => 0, 'comment' => '客户编号'],
                'customer_name' => ['type' => 'varchar', 'length' => 50, 'required' => true, 'comment' => '客户名称'],
                'idcardtype' => ['type' => 'varchar', 'length' => 50, 'required' => true, 'comment' => '客户类型'],
                'idcard' => ['type' => 'varchar', 'length' => 50, 'required' => true, 'comment' => '身份证号'],
                'mobile' => ['type' => 'varchar', 'length' => 50, 'required' => true, 'comment' => '手机号码'],
                'money' => ['type' => 'decimal', 'length' => '19,2', 'required' => true, 'default' => '0.00', 'comment' => '消费金额'],
                'money_cost' => ['type' => 'decimal', 'length' => '19,2', 'required' => true, 'default' => '0.00', 'comment' => '成本金额'],
                'cash_id' => ['type' => 'varchar', 'length' => 50, 'required' => true, 'comment' => '现金卷ID'],
                'cash_money' => ['type' => 'decimal', 'length' => '19,2', 'required' => true, 'default' => '0.00', 'comment' => '现金卷金额'],
                'is_main' => ['type' => 'int', 'length' => 11, 'required' => true, 'default' => 0, 'comment' => '是否签约代表'],

                'iscashback' => ['type' => 'tinyint', 'length' => 4, 'required' => false, 'default' => 0, 'comment' => ''],
                'other_cost' => ['type' => 'decimal', 'length' => '10,2', 'required' => false, 'default' => '0.00', 'comment' => '其他成本'],

                'create_user_id' => ['type' => 'int', 'length' => 16, 'required' => true, 'default' => '0', 'comment' => '创建人员'],
                'create_time' => ['type' => 'int', 'length' => 16, 'required' => false, 'default' => 0, 'comment' => '创建日期',],
                'update_time' => ['type' => 'int', 'length' => 16, 'required' => false, 'default' => 0, 'comment' => '更新日期',],
                'org_id' => ['type' => 'int', 'length' => 16, 'required' => false, 'default' => 1, 'comment' => '企业编号',],
                'ten_tenant_id' => ['type' => 'int', 'length' => 16, 'required' => false, 'default' => 0, 'comment' => '租户id',],
            ],
            'primary' => ['id'],
            'index' => [],
        ],
        'sup_linkman' => [
            'table_name' => 'sup_linkman',
            'comment' => '[供应商]联系人表',
            'engine' => 'InnoDB',
            'charset' => 'utf8mb4',
            'collate' => 'utf8mb4_general_ci',
            'columns' => [
                'id' => ['type' => 'int', 'length' => 16, 'unsigned' => false, 'autoincrement' => true, 'comment' => '主id',],
                'name' => ['type' => 'varchar', 'length' => 256, 'required' => true, 'comment' => '联系人姓名'],
                'gender' => ['type' => 'smallint', 'length' => 1, 'required' => true, 'comment' => '性别'],
                'postion' => ['type' => 'varchar', 'length' => 256, 'required' => true, 'comment' => '职位'],
                'tel' => ['type' => 'varchar', 'length' => 256, 'required' => true, 'comment' => '电话'],
                'mobile' => ['type' => 'varchar', 'length' => 256, 'required' => true, 'comment' => '手机号'],
                'qicq' => ['type' => 'varchar', 'length' => 256, 'required' => true, 'comment' => 'QQ'],
                'email' => ['type' => 'varchar', 'length' => 256, 'required' => true, 'comment' => '邮箱'],
                'zipcode' => ['type' => 'varchar', 'length' => 256, 'required' => true, 'comment' => '邮编'],
                'address' => ['type' => 'varchar', 'length' => 1024, 'required' => true, 'comment' => '地址'],
                'remark' => ['type' => 'varchar', 'length' => 1024, 'required' => false, 'comment' => '简介'],

                'create_user_id' => ['type' => 'int', 'length' => 16, 'required' => true, 'default' => '0', 'comment' => '创建人员'],
                'create_time' => ['type' => 'int', 'length' => 16, 'required' => false, 'default' => 0, 'comment' => '创建日期',],
                'update_time' => ['type' => 'int', 'length' => 16, 'required' => false, 'default' => 0, 'comment' => '更新日期',],
                'org_id' => ['type' => 'int', 'length' => 16, 'required' => false, 'default' => 1, 'comment' => '企业编号',],
                'ten_tenant_id' => ['type' => 'int', 'length' => 16, 'required' => false, 'default' => 0, 'comment' => '租户id',],
            ],
            'primary' => ['id'],
            'index' => [],
        ],
        'sup_supplier' => [
            'table_name' => 'sup_supplier',
            'comment' => '[供应商]供应商表',
            'engine' => 'InnoDB',
            'charset' => 'utf8mb4',
            'collate' => 'utf8mb4_general_ci',
            'columns' => [
                'id' => ['type' => 'int', 'length' => 16, 'unsigned' => false, 'autoincrement' => true, 'comment' => '主id',],
                'name' => ['type' => 'varchar', 'length' => 64, 'required' => true, 'comment' => '供应商名称'],
                'bank_account' => ['type' => 'varchar', 'length' => 64, 'required' => true, 'comment' => '银行账号'],
                'area_id' => ['type' => 'int', 'length' => 16, 'required' => true, 'default' => 0, 'comment' => '所在地区'],
                'level' => ['type' => 'varchar', 'length' => 50, 'required' => true, 'comment' => '客户等级'],
                'ecotype' => ['type' => 'varchar', 'length' => 50, 'required' => true, 'comment' => '经济类型'],
                'trade' => ['type' => 'varchar', 'length' => 50, 'required' => true, 'comment' => '行业'],
                'satisfy' => ['type' => 'smallint', 'length' => 6, 'required' => true, 'default' => 3, 'comment' => '满意度（1-5），默认为3'],
                'credit' => ['type' => 'smallint', 'length' => 2, 'required' => true, 'default' => 3, 'comment' => '信用度（1-5），默认为3'],
                'address' => ['type' => 'varchar', 'length' => 256, 'required' => true, 'comment' => '地址'],
                'linkman' => ['type' => 'varchar', 'length' => 256, 'required' => true, 'comment' => '联系人'],
                'website' => ['type' => 'varchar', 'length' => 256, 'required' => true, 'comment' => '官网'],
                'zipcode' => ['type' => 'varchar', 'length' => 64, 'required' => true, 'comment' => '邮编'],
                'tel' => ['type' => 'varchar', 'length' => 256, 'required' => true, 'comment' => '电话'],
                'mobile' => ['type' => 'varchar', 'length' => 256, 'required' => true, 'comment' => '手机号'],
                'fax' => ['type' => 'varchar', 'length' => 256, 'required' => true, 'comment' => '传真'],
                'email' => ['type' => 'varchar', 'length' => 256, 'required' => true, 'comment' => '邮箱'],
                'cert_imgs' => ['type' => 'varchar', 'length' => 256, 'required' => true, 'comment' => '执照'],
                'intro' => ['type' => 'text', 'length' => 65535, 'required' => false, 'comment' => '简介'],

                'create_user_id' => ['type' => 'int', 'length' => 16, 'required' => true, 'default' => '0', 'comment' => '创建人员'],
                'create_time' => ['type' => 'int', 'length' => 16, 'required' => false, 'default' => 0, 'comment' => '创建日期',],
                'update_time' => ['type' => 'int', 'length' => 16, 'required' => false, 'default' => 0, 'comment' => '更新日期',],
                'org_id' => ['type' => 'int', 'length' => 16, 'required' => false, 'default' => 1, 'comment' => '企业编号',],
                'ten_tenant_id' => ['type' => 'int', 'length' => 16, 'required' => false, 'default' => 0, 'comment' => '租户id',],
            ],
            'primary' => ['supplier_id'],
            'index' => [],
        ],

    ]//end tables

];